<script lang="ts" setup>
import { type Mesh, MeshLambertMaterial, type Scene } from "three";

// const data = await getTest();
// const data = await getTest();

const scene = shallowRef<Scene>();
useGLTF("/rrrr.gltf").then(gltf => {
  gltf.scene.traverse(obj => {
    if (!obj.isMesh || obj.name != "Areasbuilding")
      return;

    const mesh = obj as Mesh;

    mesh.material = new MeshLambertMaterial();
  });

  scene.value = gltf.scene;
});
</script>

<template>
  <primitive v-if="scene" :object="scene" />
</template>
